<template>
  <div class="newLeftMenu">
    <div class="top">
      <i class="el-icon-s-fold"></i>
    </div>
    <el-menu
        default-active="2"
        class="el-menu-vertical-demo" :unique-opened='true'
        @open="handleOpen"
        @close="handleClose">
      <el-menu-item index="1">处理中心</el-menu-item>
      <el-submenu index="2">
        <template slot="title">我的工作台</template>
        <el-menu-item index="2-1">选项1</el-menu-item>
        <el-menu-item index="2-2">选项2</el-menu-item>
        <el-menu-item index="2-3">选项3</el-menu-item>
      </el-submenu>
    </el-menu>
  </div>

</template>

<script>
export default {
  name: "newLeftMenu",
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped lang="less">
/deep/.el-menu-item.is-active{
  background-color: #0F47B8;
  color: white;
}
/deep/.el-submenu__title:hover{
  background-color: #0F47B8;
  color: white;
}
/deep/.el-menu-item:hover{
  background-color: #0F47B8;
  color: white;
}
/deep/.el-menu{
  border-right: none;
}
.newLeftMenu{
  background-color: white;
  width: 200px;
  height: 80%;
  // height: 80rem; 
  overflow-y: auto;
  .top{
    width: 100%;height: 47px;background-color: #E4E4E4;
    display: flex;
    align-items: center;
    justify-content: center;
    i{
      font-size: 24px;
      color:rgba(119,119,119,0.7);
    }
  }
}
</style>